package v1

import (
	"strconv"
	"wms/service/impl"
	"wms/service/request"
	"wms/service/response"

	"github.com/icetech233/gin"
)

func (a *dictApi) DictList(c *gin.Context) {
	queryParams := c.Request.URL.Query()
	bizType, _ := strconv.Atoi(queryParams.Get("bizType"))
	dictName := queryParams.Get("dictName")
	//
	arg := new(request.QueryDictRequest)
	arg.BizType = int32(bizType)
	arg.DictName = dictName
	outList := impl.DictSrvImpl.List(c, *arg)
	response.OkWithData(outList, c)
}
